package com.example.egghttp.retrofit;

import com.example.egghttp.retrofit.beans.BasicOb;
import com.example.egghttp.retrofit.beans.account.Merchant;
import com.example.egghttp.retrofit.beans.account.Status;
import com.example.egghttp.retrofit.beans.cart.Cart;
import com.example.egghttp.retrofit.beans.goods.Category;
import com.example.egghttp.retrofit.beans.goods.Good;
import com.example.egghttp.retrofit.beans.goods.Pic;
import com.example.egghttp.retrofit.beans.order.Pay;
import com.example.egghttp.retrofit.params.FooRequest;
import com.example.egghttp.retrofit.params.GetMerchantSkuByNamRequest;
import com.example.egghttp.retrofit.params.LoseRequest;
import com.example.egghttp.retrofit.params.MerchantCheckRequest;
import com.example.egghttp.retrofit.params.ModifyQtyAllocateRequestRequest;
import com.example.egghttp.retrofit.params.ObjectIdRequest;
import com.example.egghttp.retrofit.params.OrderNameRequest;
import com.example.egghttp.retrofit.params.PayRequest;
import com.example.egghttp.retrofit.params.SaveSortSkuNum;
import com.example.egghttp.retrofit.params.SkuRequest;
import com.example.egghttp.retrofit.params.StockedRequest;

import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by tse on 2017/10/9.
 */

//public interface EggService {
//    @GET("users/{user}/repos")
//    Call<List<Repo>> listRepos(@Path("user") String user);
//}


public interface EggPDAService {


    ///   final String title;
    //    final String meg;
    //    final String id_list;
    //    final String strsss;

    @Multipart
    @POST("pda/uploadPic")
    Observable<ResponseBody> updateProfile(@Part("title") RequestBody title,
                                           @Part("meg") RequestBody meg,
                                           @Part("id_list") RequestBody id_list,
                                           @Part("strsss") RequestBody strsss);

    ///
    @Multipart
    @POST("pda/uploadPic")
//    Observable<BasicOb<Pic>> uploadPic(@Part MultipartBody.Part file, @Part("description") RequestBody des);
    Observable<BasicOb<Pic>> uploadPic(@Part MultipartBody.Part file, @Part("description") RequestBody des);


    @POST("pda/login")
    Observable<BasicOb<Merchant>> LoginR(@Body FooRequest body);


    @POST("pda/getSkuByCode")
    Observable<BasicOb<Good>> getSkuByCode(@Body SkuRequest body);

    @POST("pda/getMerchantSkuByCode")
    Observable<BasicOb<Good>> getMerchantSkuByCode(@Body SkuRequest body);


    @POST("pda/loseReport")
    Observable<BasicOb<Status>> loseReport(@Body LoseRequest body);


    @POST("pda/merchantCheck")
    Observable<BasicOb<Status>> merchantCheck(@Body LoseRequest body);

    @POST("pda/merchantCheck")
    Observable<BasicOb<Status>> merchantCheck(@Body MerchantCheckRequest body);


    @POST("pda/verificateOrder")
    Observable<BasicOb<Status>> verificateOrder(@Body SkuRequest body);

    @POST("pda/saveSortOrder")
    Observable<BasicOb<Status>> saveSortOrder(@Body OrderNameRequest body);


    @POST("pda/sortOrder")
    Observable<BasicOb<Cart>> sortOrder(@Body SkuRequest body);

    @POST("pda/saveSortSkuNum")
    Observable<BasicOb<Status>> saveSortSkuNum(@Body SaveSortSkuNum body);


    @POST("pda/modifyQtyStockInSku")
    Observable<BasicOb<Status>> modifyQtyStockInSku(@Body ModifyQtyAllocateRequestRequest body);

    @POST("pda/modifyQtyAllocateSku")
    Observable<BasicOb<Status>> modifyQtyAllocateSku(@Body ModifyQtyAllocateRequestRequest body);


    @POST("pda/loseReportList")
    Observable<BasicOb<List<Good>>> loseReportList(@Body ObjectIdRequest body);


    @POST("pda/getMerchantSkuByName")
    Observable<BasicOb<List<Good>>> getMerchantSkuByName(@Body GetMerchantSkuByNamRequest body);

    @POST("pda/payOrder")
    Observable<BasicOb<Pay>> payOrder(@Body PayRequest body);


    @POST("pda/stockInList")
    Observable<BasicOb<List<Good>>> stockInList(@Body StockedRequest body);

    @POST("pda/stockInByOrderName")
    Observable<BasicOb<List<Good>>> stockInByOrderName(@Body OrderNameRequest body);

    @POST("pda/categorys")
    Observable<BasicOb<List<Category>>> categorys();

    @POST("pda/allocateList")
    Observable<BasicOb<List<Good>>> allocateList(@Body StockedRequest body);


    @GET("pda/syncGoods")
    Observable<BasicOb<List<Good>>> syncGoodsR(@Query("zee") String te, @Query("newsId") String newsId);


//    @GET("pos/syncGoods")
//    Call<BasicOb<List<Good>>> syncGoods(@Query("zee") String te, @Query("newsId") String newsId );


    //    @POST("pos/login")
//    Call<Login> Login( @Body FooRequest body, @Query("newsId") String newsId , @Query("zee") String te);

//    @POST("pos/login")
//    Call<BasicOb<Merchant>> Login(@Body FooRequest body, @Query("newsId") String newsId , @Query("zee") String te);


//    @POST("pos/addCartByCode")
//    Call<BasicOb<Cart>> addCartByCode(@Body CartRequest body);

//    @POST("pos/delCartByCode")
//    Observable<BasicOb<Cart>> delCartByCode(@Body CartRequest body);

//    @GET("pos/syncGoods")

//    Call<List<Good>> syncGoods(@Query("zee") String te, @Query("newsId") String newsId );
//    Call<Login> Login(@Header("Content-Type") String contentRange , @Body FooRequest body);
//    Call<playlist> addToPlaylist(@Header("Content-Type") String content_type, @Body PlaylistParm parm);

}

//http://api.sandan.store